<% if current_user.rails_version =~ /3.2/ %>
  <section class="instructions">
    <h1>Because you don't have the latest version of Rails, we're going to update to the latest version</h1>
    <ol>
      <li>In the command line, run the following command:</li>
      <pre><code>$ gem update rails --no-ri --no-rdoc</code></pre>
      <p>This command should update several gems for you and may take a few minutes</p>
      <li>
        Next, check to see if you have Rails installed by running:
        <pre><code>$ rails --version</code></pre>
      </li>
    </ol>
  </section>

  <%= render 'layouts/step_navigation' %>
<% else %>
  <section class="instructions">
    <h1>Because you don't have Rails installed yet, we're going to install it</h1>
    <ol>
      <li>In the command line, run the following command:</li>
      <pre><code>$ gem install rails --no-ri --no-rdoc</code></pre>
      <p>This command should update several gems for you and may take a few minutes</p>
      <li>
        Next, check to see if you have the right version of Rails installed by running:
        <pre><code>$ rails --version</code></pre>
      </li>
    </ol>
  </section>

  <%= render 'layouts/step_navigation' %>
<% end %>

<div id="trouble" class="collapse out note">
  <h4>#1 - I'm currently getting an error that has the words "SSL" and "Certificate"</h4>
  <p>If your error resembles something like...</p>
  <pre><code>#ERROR MESSAGE:
    Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/produ...</code></pre>
   Here are the main steps that should fix it. If not, consult this guide for a few alternative fixes: <a href="http://railsapps.github.io/openssl-certificate-verify-failed.html">OpenSSL Errors and Rails Guide</a>
  <pre><code>$ sudo rvm osx-ssl-certs cron install
$ brew update
$ brew install openssl
$ brew link openssl --force
$ brew install curl-ca-bundle</code></pre>

  <hr><br>

  <%= render 'layouts/disqus' %>
</div>
